package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30)" json:"username"`
	Password string `gorm:"type:varchar(30)" json:"password"`
}
type Film struct {
	gorm.Model
	Title   string `gorm:"type:varchar(30)" json:"title"`
	Content string `gorm:"type:varchar(30)" json:"content"`
	Author  string `gorm:"type:varchar(30)" json:"author"`
	Times   string `gorm:"type:varchar(30)" json:"times"`
	UserID  int    `gorm:"type:int" json:"user_id"`
	User    User   `gorm:"foreignKey:UserID" json:"user"`
}
